package com.spring.batch.base;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.validator.ValidatingItemProcessor;
import org.springframework.batch.item.validator.ValidationException;

/**
 * 带校验的处业务处理器
 */
public class PersonItemProcessor2 extends ValidatingItemProcessor<Person> {

    private static final Logger log = LoggerFactory.getLogger(PersonItemProcessor2.class);

    @Override
    public Person process(Person item) throws ValidationException {

        super.process(item);//处理校验
        return new Person();//业务处理

    }
}